VERSION 5.00 Begin VB.Form frmString BorderStyle = 4 'Fixed ToolWindow Caption = "String" ClientHeight = 5235 ClientLeft = 330 ClientTop = 2385 ClientWidth = 9765 MaxButton = 0 'False MDIChild = -1 'True PaletteMode = 1 'UseZOrder ScaleHeight = 5235 ScaleWidth = 9765 ShowInTaskbar = 0 'False Begin VB.PictureBox Picture1 Align = 2 'Align Bottom BorderStyle = 0 'None FillColor = &H8000000F& FillStyle = 0 'Solid Height = 465 Left = 0 ScaleHeight = 465 ScaleWidth = 9765 TabIndex = 4 Top = 4770 Width = 9765 Begin VB.CommandButton Command2 Caption = "&Reset" Height = 285 Left = 8910 TabIndex = 10 Top = 105 Width = 825 End Begin VB.TextBox Text1 Height = 285 Left = 1440 TabIndex = 5 Tag = "A/BC/DEF/GHIJ/KLMNOP/" Top = 90 Width = 7350 End Begin VB.Label Label1 Caption = "&Enter a test string" Height = 255 Left = 90 TabIndex = 6 Top = 120 Width = 1275 End End Begin VB.Frame Frame1 Height = 570 Left = 0 TabIndex = 1 Top = -90 Width = 9735 Begin VB.CommandButton cmdNP Caption = ">" Height = 285 Index = 1 Left = 9360 TabIndex = 9 Top = 195 Width = 285 End Begin VB.CommandButton cmdNP Caption = "<" Height = 285 Index = 0 Left = 8460 TabIndex = 8 Top = 195 Width = 285 End Begin VB.CommandButton Command1 Caption = "&Go" Default = -1 'True Height = 285 Left = 8820 TabIndex = 7 Top = 195 Width = 465 End Begin VB.ComboBox cmb_Function Height = 315 Left = 1365 TabIndex = 2 Top = 180 Width = 7005 End Begin VB.Label Label2 Caption = "&Select a function" Height = 255 Left = 90 TabIndex = 3 Top = 210 Width = 1275 End End Begin VB.TextBox txt_Result BackColor = &H00C0C0C0& BorderStyle = 0 'None Height = 4005 Left = 105 Locked = -1 'True MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 0 Top = 630 Width = 9555 End Attribute VB_Name = "frmString" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Option Base 1 Private Const Iteration = 250 Dim IsLoaded As Integer Dim TimerStartOk As Integer Dim TimerCloseOk As Integer Dim TimerHandle As Integer Dim TimerValue As Long Private Sub cmdNP_Click(Index As Integer) Call sub_NextPrev(cmb_Function, Index) End Sub Private Sub cmb_Function_Click() If (IsLoaded = False) Then Exit Sub Call cDisableFI(mdiT2W.Picture1) Picture1.Visible = True txt_Result = "" DoEvents Select Case cmb_Function.ListIndex Case 0 Call TestOneCharFromLeft Case 1 Call TestOneCharFromRight Case 2 Call TestBlockCharFromLeft Case 3 Call TestBlockCharFromRight Case 4 Call TestGetIn Case 5 Call TestGetInR Case 6 Call TestGetInPart Case 7 Call TestGetInPartR Case 8 Call TestGetBlock Case 9 Call TestInsertChars Case 10 Call TestInsertByMask Case 11 Call TestInsertBlocks Case 12 Call TestInsertBlocksBy Case 13 Call TestRemoveOneChar Case 14 Call TestRemoveBlockChar Case 15 Call TestTokenIn Case 16 Picture1.Visible = False Call TestOrTokenX Case 17 Picture1.Visible = False Call TestAndTokenX Case 18 Call TestReverse Case 19 Call TestMixChars Case 20 Call TestScrollX Case 21 Call TestChangeChars Case 22 Call TestChangeCharsUntil Case 23 Call TestCheckChars Case 24 Call TestFilterChars Case 25 Call TestFilterNotChars Case 26 Call TestFilterBlocks Case 27 Call TestResizeString Case 28 Call TestResizeStringAndFill Case 29 Call TestCreateAndFill Case 30 Call TestFill Case 31 Call TestLrc Case 32 Call TestCompress Case 33 Picture1.Visible = False Call TestCompressTab Case 34 Call TestCompact Case 35 Call TestAlign Case 36 Call TestProperName Case 37 Call TestProperName2 Case 38 Call TestStringSAR Case 39 Call TestToHexa Case 40 Picture1.Visible = False Call TestRomanArabic Case 41 Call TestAsciiEbcdic Case 42 Picture1.Visible = False Call TestPatternMatch Case 43 Picture1.Visible = False Call TestPatternExtMatch Case 44 Call TestCheckNumericity Case 45 Call TestAlphaDigit Case 46 Picture1.Visible = False Call TestH2X Case 47 Call TestSortStr Case 48 Call TestMorse Case 49 Call TestToZ9 Case 50 Call TestDeleteSubString Case 51 Call TestStringReplace Case 52 Call TestLRFill Case 53 Call TestLRSetIn Case 54 Call TestMatchTable Case 55 Call TestInStr Case 56 Call TestExtract Case 57 Call TestExtractIsolate Case 58 Call TestWrapLine Case 59 Call TestRemoveReplace End Select DoEvents Call cEnableFI(mdiT2W.Picture1) End Sub Private Sub Form_Activate() mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration) End Sub Private Sub Form_Load() IsLoaded = False Show Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1) Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w") IsLoaded = True End Sub Private Sub Command1_Click() Call cmb_Function_Click End Sub Private Sub TestOneCharFromLeft() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cOneCharFromLeft(Str1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub Command2_Click() Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1) Call Command1_Click End Sub Private Sub TestOneCharFromRight() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cOneCharFromRight(Str1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestBlockCharFromLeft() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cBlockCharFromLeft(Str1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestBlockCharFromRight() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cBlockCharFromRight(Str1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestGetIn() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cGetIn(Str1, "/", 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestGetInR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cGetInR(Str1, Sep1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestGetInPart() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cGetInPart(Str1, Sep1, True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestGetInPartR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cGetInPartR(Str1, Sep1, True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestGetBlock() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim BlockSize As Integer intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text BlockSize = 2 strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf BlockSize = 3 strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf BlockSize = 4 strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cGetBlock(Str1, BlockSize, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestInsertChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cInsertChars(Str1, 1, "a") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestInsertByMask() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Mask1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Nr ## Price $###.##" Str2 = "0705200" Mask1 = "#" strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = String(cCount(Str1, "/"), "*") Mask1 = "/" strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cInsertByMask(Str1, Mask1, Str2) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestInsertBlocks() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "A~BC~DEF~GHIJ~" Str2 = "a~bc~def~ghij" strDisplay = strDisplay + "Insert (InsertBlocks) '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf Str1 = "A~BC~DEF~GHIJ~" Str2 = "" strDisplay = strDisplay + "Insert (InsertBlocks) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf Str1 = "A~BC~DEF~GHIJ~" Str2 = "" strDisplay = strDisplay + "Insert (InsertBlocksExt) '' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocksExt(Str1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cInsertBlocks(Str1, Str2) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Public Sub TestInsertBlocksBy() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = "a/bc/def/ghij" Sep1 = "/" strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = "" strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cInsertBlocksBy(Str1, Str2, Sep1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestRemoveOneChar() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 1) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cRemoveOneChar(Str1, 7) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Public Sub TestRemoveBlockChar() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cRemoveBlockChar(Str1, 1, 1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestTokenIn() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/HM" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cTokenIn(Str1, Sep1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestOrTokenX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Sep1 = "\" Str1 = "FOX|OVER|THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick|jumps|the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX\OVER\THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\jumps\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX/OVER/THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\JUMPS\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = LCase$("quick\jumps\THE") Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG") strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cOrTokenIn(Str2, Str1, Sep1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestAndTokenX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Sep1 = "\" Str1 = "FOX|OVER|THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick|jumps|the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX\OVER\THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\jumps\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX/OVER/THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\JUMPS\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = LCase$("quick\jumps\THE") Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG") strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cOrTokenIn(Str2, Str1, Sep1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestReverse() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cReverse(Str1) strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cReverse(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestMixChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf Str1 = "TIME TO WIN (32-Bit)" Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf Str1 = "Under the sky, the sun lights" Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cMixChars(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestScrollX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = Text1.Text strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf For i = 1 To 7 Str2 = cScrollL(Str2) strDisplay = strDisplay & Str2 & vbCrLf Next i strDisplay = strDisplay & vbCrLf Str1 = Text1.Text Str2 = Text1.Text strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf For i = 1 To 7 Str2 = cScrollR(Str2) strDisplay = strDisplay & Str2 & vbCrLf Next i strDisplay = strDisplay & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cScrollL(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestChangeChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "AZM", "qyc") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "AZM", "qyc") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "qyc", "+-*") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration Call cChangeChars(Str1, "AZM", "qyc") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestChangeCharsUntil() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "qyc", "+-*", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestCheckChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cCheckChars(Str1, "aZ") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestFilterChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterChars(Str1, "BY") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cFilterChars(Str1, "B/") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestFilterNotChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterNotChars(Str1, "BY") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cFilterNotChars(Str1, "B/") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestFilterBlocks() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cFilterBlocks(Str1, "BI") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestResizeString() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cResizeString(Str1, 5) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestResizeStringAndFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cResizeStringAndFill(Str1, 50, "*") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestCreateAndFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cCreateAndFill(40, Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf Call cFill(Str1, "*=") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf Call cFill(Str1, "=*=") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf Call cFill(Str1, "7516") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf Call cFill(Str1, "$61.00") strDisplay = strDisplay & "'" & Str1 & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration Call cFill(Str1, "*=") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestLrc() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf Str1 = Chr$(2) & "0a12721536" strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cLrc(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestCompress() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf Str1 = "A " & Chr$(9) & "BC " strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cCompress(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Public Sub TestCompressTab() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Str3 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "A BC DEF GHIJ " For i = 1 To 6 Str2 = cCompressTab(Str1, i) Str3 = Str2 Call cChangeChars(Str3, vbTab, " strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf Next i txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cCompressTab(Str1, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestCompact() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "987654321" Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf Str1 = "1234567890" Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cCompact(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestAlign() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "T2WIN-32" strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cAlign(Str1, 1, 30) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestProperName() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "John fitz,jr" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "john Fitz, jr" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "macdonald" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "mac donald" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cProperName(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestProperName2() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "JOHN FITZ,JR" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "john Fitz,jr" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "macdonald" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "mac donald" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "a.l. greene jr." strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "shale and sandstone and till" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "a sandstone or a shale" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "RR2 BARRHEAD" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf Str1 = "ANDY MACDONALD" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cProperName2(Str1, "", 0) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestStringSAR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL" Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False) strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "2W", "IME TO W", True) strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "T2WIN-32", "", True) strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "I", "i", False) strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestToHexa() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGH" Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf Str1 = "01234567890" Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cToHexa(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestRomanArabic() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Value As Integer intResult = 0 strResult = "" strDisplay = "" Str1 = UCase$(cArabicToRoman(Year(Int(Now)))) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1)) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1)) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Value = Year(Int(Now)) strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf Value = Year(Int(Now)) - 1 strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf Value = Year(Int(Now)) + 1 strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cArabicToRoman(1996) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestAsciiEbcdic() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGH" Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf Str1 = "01234567890" Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration Call cCnvASCIItoEBCDIC(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestPatternMatch() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Under the blue sky, the sun lights" strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf strDisplay = strDisplay & "PatternMatchS (case insensitive) '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatchS(Str1, Str2, False) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str2 = "Under?the * s??,*" TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cPatternMatch(Str1, Str2) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestPatternExtMatch() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Under the blue sky, the sun lights" strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "~55~6E*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the *'~72~73~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "~55~6G*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the *'~72~53~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf strDisplay = strDisplay & "PatternExtMatchS (case insensitive) '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "~55~6E*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under?the *'~72~73~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "~55~6G*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf Str2 = "Under?the *'~72~53~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatchS(Str1, Str2, False) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str2 = "Under?the * s??,*" TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cPatternExtMatch(Str1, Str2) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestCheckNumericity() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "1234567890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "-1234567890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "+12345.67890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cCheckNumericity(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestAlphaDigit() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "1234567890" strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cAddDigit(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestH2X() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf Str1 = "0" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "1" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1B" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "7FFF" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "FFFF" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf Str1 = "0" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "1" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1B" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "7FFFFFFF" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "B2A1A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "FFFFFFFF" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cH2I(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestSortStr() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str1 = cResizeStringAndFill(Str1, 60, " ") strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf intResult = cSortStr(Str1, 20, 3) strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf Str1 = "ABCBCABECAEB" strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf intResult = cSortStr(Str1, 4, 3) strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf Str1 = Text1.Text Str1 = cResizeStringAndFill(Str1, 60, " ") strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf intResult = cReverseSortStr(Str1, 20, 3) strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf Str1 = "ABCBCABECAEB" strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf intResult = cReverseSortStr(Str1, 4, 3) strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cSortStr(Str1, 4, 3) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestMorse() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "SOS" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "T2WIN-32" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "Nothing can beat the fox" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cMorse(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestToZ9() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cToZ9(Str1) strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Str2 = cToZ9(Str1) strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf Str1 = "01234567890" Str2 = cToZ9(Str1) strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cToZ9(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestDeleteSubString() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Case Insensitive and Case Sensitive" & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete '' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete 'a' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "a", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "a", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete 'A' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "A", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "A", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete 'mnop' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "mnop", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "mnop", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete 'bcd' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "bcd", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "bcd", True) & vbCrLf & vbCrLf Str1 = "this is a test and this is an another test" strDisplay = strDisplay & "Delete 'is' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "is", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "is", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Delete 'test' into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "test", False) & vbCrLf strDisplay = strDisplay & cDeleteSubString(Str1, "test", True) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cDeleteSubString(Str1, "a", False) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestStringReplace() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = "/bc/|/BC/" strDisplay = strDisplay & "Case Insensitive and Case Sensitive" & vbCrLf & vbCrLf strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf Str1 = "this si a test and this is na another test" Str2 = "si|is;na|an" strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf Str1 = "this si a test and this is na another test" Str2 = "this si a test|this is an another test;this is na another test|this is really an another test" strDisplay = strDisplay & "Process '" & Str1 & "' with '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, False) & vbCrLf strDisplay = strDisplay & cStringReplace(Str1, Str2, True) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cStringReplace(Str1, Str2, False) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestLRFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "1234" strDisplay = strDisplay & "NewLength = 10" & vbCrLf & vbCrLf strDisplay = strDisplay & "LFill '" & Str1 & "' with ' ' is " & vbCrLf strDisplay = strDisplay & cLFill(Str1, " ", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "LFill '" & Str1 & "' with '0' is " & vbCrLf strDisplay = strDisplay & cLFill(Str1, "0", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "LFill '" & Str1 & "' with '_' is " & vbCrLf strDisplay = strDisplay & cLFill(Str1, "_", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "LFill '" & Str1 & "' with '' is " & vbCrLf strDisplay = strDisplay & cLFill(Str1, "", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & vbCrLf & vbCrLf strDisplay = strDisplay & "RFill '" & Str1 & "' with ' ' is " & vbCrLf strDisplay = strDisplay & cRFill(Str1, " ", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "RFill '" & Str1 & "' with '0' is " & vbCrLf strDisplay = strDisplay & cRFill(Str1, "0", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "RFill '" & Str1 & "' with '_' is " & vbCrLf strDisplay = strDisplay & cRFill(Str1, "_", 10) & vbCrLf & vbCrLf strDisplay = strDisplay & "RFill '" & Str1 & "' with '' is " & vbCrLf strDisplay = strDisplay & cRFill(Str1, "", 10) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cLFill(Str1, "0", 10) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestLRSetIn() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Insert '' on the left in block 5 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cLSetIn(Str1, "/", 5, "") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '*' on the left in block 1 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cLSetIn(Str1, "/", 1, "*") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '***' on the left in block 3 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cLSetIn(Str1, "/", 3, "***") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '*******' on the left in block 7 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cLSetIn(Str1, "/", 7, "*******") & vbCrLf & vbCrLf strDisplay = strDisplay & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '' on the right in block 5 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cRSetIn(Str1, "/", 5, "") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '*' on the right in block 1 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cRSetIn(Str1, "/", 1, "*") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '***' on the right in block 3 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cRSetIn(Str1, "/", 3, "***") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '*******' on the right in block 7 into '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cRSetIn(Str1, "/", 7, "*******") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cLSetIn(Str1, "/", 7, "*******") Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestMatchTable() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Match '' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("", Str1, "/", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'bc' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("bc", Str1, "/", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'bc' (case insensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("bc", Str1, "/", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'BC' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("BC", Str1, "/", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'BC' (case insensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("BC", Str1, "/", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'abc' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("abc", Str1, "/", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Match 'abc' (case insensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cMatchTable("abc", Str1, "/", False) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cMatchTable("klmnop", Str1, "/", True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestInStr() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Find '' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(1, Str1, "", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'bc' (case sensitive) in '' is " & vbCrLf strDisplay = strDisplay & cInStr(1, "", "bc", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find '' (case sensitive) in '' is " & vbCrLf strDisplay = strDisplay & cInStr(1, "", "", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'bc' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(1, Str1, "bc", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'bc' (case insensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(1, Str1, "bc", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'bc' (case sensitive) from position 7 in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(7, Str1, "bc", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'bc' (case insensitive) from position 7 in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(7, Str1, "bc", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'BC' (case sensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(1, Str1, "BC", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'BC' (case insensitive) in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(1, Str1, "BC", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'BC' (case sensitive) from position 7 in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(7, Str1, "BC", True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'BC' (case insensitive) from position 7 in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(7, Str1, "BC", False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Find 'BC' (case insensitive) from position 0 in '" & Str1 & "' is " & vbCrLf strDisplay = strDisplay & cInStr(0, Str1, "BC", False) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration intResult = cInStr(1, Str1, "klmnop", True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestExtract() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Str1 + "Path: ourworld.compuserve.com/homepages/alpouda" & vbCrLf Str1 = Str1 + "From: time to win 32-bit" & vbCrLf Str1 = Str1 + "Newsgroups: comp.lang.basic.visual.misc" & vbCrLf Str1 = Str1 + "Subject: extract a sub-string with a key" & vbCrLf Str1 = Str1 + "Date: 17 Aug 1997 16:25:43 GMT" & vbCrLf Str1 = Str1 + "Organization: The M.C.R. Company" & vbCrLf Str1 = Str1 + "Lines: 25" & vbCrLf Str1 = Str1 + "Message-ID: <5t5u41$8ai$11@ourworld.compuserve.com>" & vbCrLf Str1 = Str1 + "NNTP-Posting-Host: ppp054.103.ourworld.compuserve.com" & vbCrLf Str1 = Str1 + "Post-Count: 000518" & vbCrLf Str1 = Str1 + "Xref: time to win 32-bit (v" & cGetVersion() & ")" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = True) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "Path:" & vbCrLf & cExtract(Str1, "Path:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Newsgroups:" & vbCrLf & cExtract(Str1, "Newsgroups:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Subject:" & vbCrLf & cExtract(Str1, "Subject:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Organization:" & vbCrLf & cExtract(Str1, "Organization:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Lines:" & vbCrLf & cExtract(Str1, "Lines:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Message-ID:" & vbCrLf & cExtract(Str1, "Message-ID:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "NNTP-Posting-Host:" & vbCrLf & cExtract(Str1, "NNTP-Posting-Host:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Post-Count:" & vbCrLf & cExtract(Str1, "Post-Count:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "Xref:" & vbCrLf & cExtract(Str1, "Xref:", vbCrLf, True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = True) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, True) & vbCrLf strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", vbCrLf, True) & vbCrLf & vbCrLf strDisplay = strDisplay & "Extract data for the following key (field separator = Cr+Lf; sensitivity = False) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", vbCrLf, False) & vbCrLf strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", vbCrLf, False) & vbCrLf & vbCrLf strDisplay = strDisplay & "Extract data for the following key (field separator = ""; sensitivity = False) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & cExtract(Str1, "From:", "", False) & vbCrLf strDisplay = strDisplay & "from:" & vbCrLf & cExtract(Str1, "from:", "", False) & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cExtract(Str1, "Path:", vbCrLf, True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestExtractIsolate() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Str1 + "Path: ourworld.compuserve.com/homepages/alpouda" & vbCrLf Str1 = Str1 + "From: time to win 32-bit" & vbCrLf Str1 = Str1 + "Newsgroups: comp.lang.basic.visual.misc" & vbCrLf Str1 = Str1 + "" & vbCrLf Str1 = Str1 + "This is the body of the message" & vbCrLf Str1 = Str1 + "Nice DLL" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & "ExtractIsolate data for the following key (field separator = Cr+Lf; EXTRACT_ISOLATE_LEFT; sensitivity = True) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "Path:" & vbCrLf & "> " & cExtractIsolate(Str1, "Path:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & "> " & cExtractIsolate(Str1, "From:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf strDisplay = strDisplay & "Newsgroups:" & vbCrLf & "> " & cExtractIsolate(Str1, "Newsgroups:", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf strDisplay = strDisplay & "''" & vbCrLf & "> " & cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_LEFT, True) & vbCrLf & vbCrLf strDisplay = strDisplay & "ExtractIsolate data for the following key (field separator = Cr+Lf; EXTRACT_ISOLATE_RIGHT; sensitivity = True) :" & vbCrLf & vbCrLf strDisplay = strDisplay & "Path:" & vbCrLf & "> " & cExtractIsolate(Str1, "Path:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf strDisplay = strDisplay & "From:" & vbCrLf & "> " & cExtractIsolate(Str1, "From:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf strDisplay = strDisplay & "Newsgroups:" & vbCrLf & "> " & cExtractIsolate(Str1, "Newsgroups:", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf strDisplay = strDisplay & "''" & vbCrLf & "> " & cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cExtractIsolate(Str1, "", vbCrLf, EXTRACT_ISOLATE_RIGHT, True) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestWrapLine() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Str1 & "123456789 123456789 1234567890 123456789 123456789 123456789 " Str1 = Str1 & "This is a line with some text, which is to long " Str1 = Str1 & "for the purpose we need it for." & vbCrLf & vbCrLf & "This " Str1 = Str1 & "means we have to do some word wrapping. " Str1 = Str1 & "That's why we need the cWrapLine() function." strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf strDisplay = strDisplay & "WrapLine on 30 characters :" & vbCrLf & vbCrLf strDisplay = strDisplay & cWrapLine(Str1, 30, " ", vbCrLf) & vbCrLf & vbCrLf strDisplay = strDisplay & "WrapLine on 40 characters :" & vbCrLf & vbCrLf strDisplay = strDisplay & cWrapLine(Str1, 40, " ", vbCrLf) & vbCrLf & vbCrLf strDisplay = strDisplay & "WrapLine on 60 characters :" & vbCrLf & vbCrLf strDisplay = strDisplay & cWrapLine(Str1, 60, " ", vbCrLf) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cWrapLine(Str1, 30, " ", vbCrLf) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub Private Sub TestRemoveReplace() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Replace the 7 char of '" & Str1 & "' with '?' is " & vbCrLf & vbCrLf Call cReplaceChar(Str1, 7, "?") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Replace the last char of '" & Str1 & "' with '!' is " & vbCrLf & vbCrLf Call cReplaceLastChar(Str1, "!") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Remove the last char '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveLastChar(Str1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerHandle = cTimerOpen() TimerStartOk = cTimerStart(TimerHandle) For i = 1 To Iteration strResult = cRemoveLastChar(Str1) Next i mdiT2W.pnl_Timer = cTimerRead(TimerHandle) TimerCloseOk = cTimerClose(TimerHandle) End Sub